<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html>
<head>
<title>添加车辆类型信息</title>
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath }/css/readerTyper.css" />
<script type="text/javascript" src="../../js/car.js"></script>
</head>
<body style="font-size: 20px">
	<%@ include file="navigation.jsp"%>
	<div id="content">
		<p id="p">当前位置：车辆管理 > 车辆类型管理 >>添加车辆类型信息>>></p>
		<div>
			<form name="form1" method="post"
				action="/addcarType.do">
				<table border="1" cellpadding="0" cellspacing="0">
					<!--  <tr>
					<td class="t1">ID：</td>
					<td><input name="carTypeId" type="text" size="30" class="c1">
					</td>
				</tr>-->
					<tr>
						<td class="t1">车辆类型名称：</td>
						<td><input name="carTypeName" type="text" size="30"
							class="c1" placeholder="车辆类型名称" required="required"></td>
					</tr>
					<tr>
						<td class="t1">车辆容量：</td>
						<td><input name="carCapacity" type="text" size="30" id="carCapacity"
							class="c1" required="required">(单位)</td>
					</tr>
					<tr>
						<td class="t1">操作：</td>
						<td><input name="Submit" type="submit" value="保存" class="c1"
							onclick="check03()" > &nbsp; <input name="Submit2"
							type="button" value="关闭" onClick="history.back()" class="c1"></td>
					</tr>
				</table>
			</form>
		</div>
</body>
<script type="text/javascript">
function check03() {
	var carCapacity = $("#carCapacity").val();
	var reg = /^[0-9\.]{0,10}$/
	var pattern = new RegExp(reg);
	if ((pattern.test(carCapacity))) {//关于车辆容量的检查
		if (carCapacity == 0) {
			alert("车辆容量不能为0");
			$("#carCapacity").attr("value", "");
		}
	} else {
		alert("车辆容量只能输入数字");
		$("#carCapacity").attr("value", "");
	}
}



</script>


</html>